#pragma once
#include "tinyxml.h"
#include "Constant.h"
#include "CardInfo.h"
class XmlHandler
{
	static const int MAX_XML_LENGTH = 1024 * 16;
public:
	int id;
    int type;
    int sender;
    int receiver;
protected:
	TiXmlElement* rootNode;
	TiXmlDocument* xmlDoc;
protected:
	virtual void addBody(){};
	virtual void addAttributeType(){};
public:
	XmlHandler(char* xmlString);
	XmlHandler(void);
	static XmlHandler* getMessageHandler(char* xmlString);
	~XmlHandler(void);
	char* toXmlString();
};
